package com.technology.random;

import java.util.Random;

public class RandomUsing {

	public static void main(String[] args) {
		double value = Math.floor(Math.random());
		int random = Double.valueOf(value).intValue();
		System.out.println("Random number: " + random);
		
		Random randomizer = new Random(100);
		System.out.println("Random int: " + randomizer.nextInt());
		System.out.println("Random float: " + randomizer.nextFloat());
		System.out.println("Random boolean: " + randomizer.nextBoolean());
		
		byte[] bytes = new byte[10];
		randomizer.nextBytes(bytes);
		
		for (byte b : bytes){
			System.out.println("Byte: " + b);
		}
	}

}
